package cn.gson.work.model.pojos;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import java.util.Objects;

@Entity
public class Files {
    private String fid;
    private String fname;
    private String fsecurity;
    private String fstate;
    private String fborrower;

    @Id
    @Column(name = "FID")
    public String getFid() {
        return fid;
    }

    public void setFid(String fid) {
        this.fid = fid;
    }

    @Basic
    @Column(name = "FNAME")
    public String getFname() {
        return fname;
    }

    public void setFname(String fname) {
        this.fname = fname;
    }

    @Basic
    @Column(name = "FSECURITY")
    public String getFsecurity() {
        return fsecurity;
    }

    public void setFsecurity(String fsecurity) {
        this.fsecurity = fsecurity;
    }

    @Basic
    @Column(name = "FSTATE")
    public String getFstate() {
        return fstate;
    }

    public void setFstate(String fstate) {
        this.fstate = fstate;
    }

    @Basic
    @Column(name = "FBORROWER")
    public String getFborrower() {
        return fborrower;
    }

    public void setFborrower(String fborrower) {
        this.fborrower = fborrower;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Files files = (Files) o;
        return Objects.equals(fid, files.fid) &&
                Objects.equals(fname, files.fname) &&
                Objects.equals(fsecurity, files.fsecurity) &&
                Objects.equals(fstate, files.fstate) &&
                Objects.equals(fborrower, files.fborrower);
    }

    @Override
    public int hashCode() {
        return Objects.hash(fid, fname, fsecurity, fstate, fborrower);
    }
}
